﻿@model IEnumerable<Superstore.Vender.Models.VenderOrderGoodsInfo>
@{
    int orderStatus = Convert.ToInt32(ViewBag.OrderStatus);
    int pickType = Convert.ToInt32(ViewBag.PickType);
}

@foreach (var item in Model)
{
    foreach (var code in item.goods_code)
    {
        <li>
            <div class="good_info">
                <img class="good_img" src="@item.goods_info.image">
                <div class="good_text">
                    <span class="good_name">@item.goods_info.name</span><span class="good_cost">￥@item.goods_info.price</span>
                </div>
            </div>
            @if (@orderStatus == 1)
            {
                <div class="good_count">×1</div>
            }
            else if (@orderStatus == 2)
            {
                if (@code.CompareTo("0000000000") == 0)
                {
                    <div class="good_count" style="color:gray">已取货</div>
                }
                else
                {
                    if (pickType == 1)
                    {
                        <div class="good_count">@code</div>
                    }
                    else if (pickType == 2)
                    {
                        <div class="good_count" goodsid="@item.goods_info.goodsid" code="@code" onclick="aKeyPickGoods(@item.goods_info.goodsid, '@code');">
                            <input type="button" value="取货" />
                        </div>
                    }
                }
            }
            else if (@orderStatus == 3)
            {
                <div class="good_count" style="color:gray">已取货</div>
            }
        </li>
    }
}